<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport"  content="width=device-width,height=device-height initial-scale=1">
	
		<script type="text/javascript" src="src/jquery/jquery-1.6.2.min.js"></script>
		<script type="text/javascript" src="src/jquery/jquery.mobile-1.0b3.min.js"></script> 
		
		<script type="text/javascript" src="src/scripts/json_sans_eval.min.js"></script>
		<script type="text/javascript" src="src/scripts/basic.min.js"></script>
		<script type="text/javascript" src="src/scripts/caller.min.js"></script>
	   
		
		<link rel="stylesheet" href="src/css/basic.css" type="text/css" />
		<link  type="text/css" href="src/jquery/jquery.mobile-1.0b3.min.css" rel="stylesheet" />
		
		<!-- Include the GMAP Library  	
		
	    -->
		<script type="text/javascript">
		
   		</script>
	
	</head>
	<body>
	 
	   <!--2.-BUSCAR  -->
	   <div id="myview" data-role="page" > 
	 
			<div data-role="header" data-theme="b"> 
					<h1>Proyectos</h1>
					<a onclick="clickExit()" data-role="button" data-icon="delete" data-theme="d" data-iconpos="notext">Salir</a>  
		    </div>
			<div class="css_head"></div>
		
			<div  data-role="content" data-theme="d">
				     <p>Selecione uno y/o varios criterios para realizar la b&#250;squeda de proyectos</p>
					 <label></label>
			      	 
					 <div data-role="fieldcontain" data-theme="e">
				     <label for="txtname">Nombre</label>
				       <input type="text" name="txtname" id="txtname" value=""  />
				     </div>	
				 	 <center>
				 	   <div data-role="controlgroup" data-type="horizontal"> 
				 	  				<a id="btnSeek1" data-role="button" data-theme="b" data-inline="true"  data-icon="search">Buscar</a>
				 		    		<a id="btnClear1" data-role="button" data-theme="c" data-inline="true"  data-icon="refresh">Limpiar</a>
				 	</div>
				      <ul data-role="listview" data-inset="true" id="controlgroup_links">
										<li data-role="list-divider">Criterios Adicionales</li>
								      	<li> <a  data-url="#optEje">Eje <span id="opt0" class="ui-li-count">Ninguno</span></a></li>
										<li> <a  data-url="#optPro">Programa <span id="opt1" class="ui-li-count">Ninguno</span></a></li>
										<li> <a  data-url="#optTipo">Tipo <span id="opt2" class="ui-li-count">Ninguno</span></a></li>
									    <li> <a  data-url="#optEst">Estado<span id="opt3" class="ui-li-count">Ninguno</span></a></li>
					 </ul>
					 </center>
				     <p></p>
				     <center>
			 				<div data-role="controlgroup" data-type="horizontal">	
			 					<a id="btnSeek2"  data-role="button" data-theme="b" data-inline="true" data-icon="search">Buscar</a>
								<a  onclick="clickExit()" data-role="button" data-theme="e" data-icon="delete" data-transition="pop">Salir</a>
							</div>
				   </center>	
					<!--</div> -->	
			</div>
			<div data-role="footer" data-theme="c"> 
  		 		<div class="css_footer">
  		 	   	</div>
		    </div>
		</div>
		 <!--2.1.-BUSCAR:Estado  -->
		<div id="optEst" data-role="page">
			<div data-role="header" data-theme="b">
				<a  onclick="clickBackList();"  data-role="button" data-icon="check" data-iconpos="notext">Continuar</a>
				<h1>Estado</h1>
			</div><!-- /header -->
			<div class="css_head"></div>
			<div data-role="content">	
			    <div id="resultsSeekEst"></div>
			 	<div data-role="fieldcontain">
                     <label for="select-choice-4" class="select"></label>
				     <select name="select-choice-4" id="select-choice-4" data-role="none"> 
							<option value="0">Ninguno</option> 
					 </select> 
				 </div>
	    	</div><!-- /content -->
			<div data-role="footer" data-theme="c"> 
  			 <div class="css_footer"></div>
			</div>
		</div><!-- /page -->
		<!--End Interfaz n-2.1  -->
		
						
		 <!--2.2 -BUSCAR:Tipo  -->
		<div id="optTipo" data-role="page">
			<div data-role="header" data-theme="b">
				<h1>Tipo</h1>
				<a  onclick="clickBackList();"  data-role="button" data-icon="check" data-iconpos="notext">Continuar</a>	
			</div><!-- /header -->
			<div class="css_head"></div>
			<div data-role="content">
			     <div id="resultsSeekTipo"></div>	
			 	<div data-role="fieldcontain">
                     <label for="select-choice-3" class="select"></label>
				     <select name="select-choice-3" id="select-choice-3" data-role="none"> 
							<option value="0">Ninguno</option> 
					 </select> 
				 </div>
	    	</div><!-- /content -->
			<div data-role="footer" data-theme="c"> 
  			 <div class="css_footer"></div>
			</div>
		</div><!-- /page -->
		<!--End Interfaz n-2.2  -->
		
		 <!--2.3-BUSCAR:Programa  -->
		<div id="optPro" data-role="page">
			<div data-role="header" data-theme="b">
				<h1>Programa</h1>
				<a  onclick="clickBackList();"  data-role="button" data-icon="check" data-iconpos="notext">Continuar</a>	
			</div><!-- /header -->
			<div class="css_head"></div>
			<div data-role="content">
			     <div id="resultsSeekPro"></div>	
			 	<div data-role="fieldcontain">
                     <label for="select-choice-2" class="select"></label>
				     <select name="select-choice-2" id="select-choice-2" data-role="none" > 
							<option value="0">Ninguno</option> 
					 </select> 
				 </div>
	    	</div><!-- /content -->
			<div data-role="footer" data-theme="c"> 
  			 <div class="css_footer"></div>
			</div>
		</div><!-- /page -->
		<!--End Interfaz n-1.3  -->
		
		 <!--2.4-BUSCAR:Eje  -->
		<div id="optEje" data-role="page">
			<div data-role="header" data-theme="b">
				<h1>Eje</h1>
				<a  onclick="clickBackList();"  data-role="button" data-icon="check" data-iconpos="notext">Continuar</a>	
			</div><!-- /header -->
			<div class="css_head"></div>
			<div data-role="content">
			    <div id="resultsSeekEje"></div>	
				
			 	<div data-role="fieldcontain">
                     <label for="select-choice-1" class="select"></label>
				     <select name="select-choice-1" id="select-choice-1" data-role="none"> 
							<option value="0">Ninguno</option> 
					 </select> 
				 </div>
	    	</div><!-- /content -->
			<div data-role="footer" data-theme="c"> 
  			 <div class="css_footer"></div>
			</div>
		</div><!-- /page -->
		<!--End Interfaz n-1.4  -->
			
		
	<!--2.-RESULTADO  -->	
	<div id="categories" data-role="page"  data-theme="b">
		<div data-role="header" data-theme="b"> 
		    <!--<a onclick="clickExit()" data-role="button" data-icon="delete" data-theme="d" data-iconpos="notext">Salir</a>  -->
		    <a id="btnBackSeek" data-icon="arrow-l" data-iconpos="notext" >B&#250;squeda</a>
			<h1>Proyectos</h1> 
			<a href="#geoglobal" data-icon="search" data-iconpos="notext">Georeferencia</a>
			
		</div>
		<div class="css_head">
		</div>
		<div  data-role="content" data-theme="d">
			
			<div id="resultscategories"></div>
			<div id="categories_content">
				<div id="content-label-seek"></div>
			    <ul  data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b">
					<li data-role="list-divider"><div id="content-label-count"></div></li>
					<li>
					
					</li>
				</ul>
				<ul id="listview_output" data-filter="true" data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b">
				</ul>
		
				
			</div>
		</div>
		
		<a  onclick="clickExit()" data-role="button" data-theme="e" data-icon="delete" data-transition="pop">Salir</a>
		
		<div data-role="footer" data-theme="c"> 
  		 <div class="css_footer"></div>
		</div>

	</div>
	<!--2.1-RESULTADO:DETALLE  -->	
	<div id="primary_seek" data-role="page"  data-rel="dialog">
				<!-- /header -->
				<div data-role="header" data-theme="b">
				    <!--<a onclick="clickExit()" data-role="button" data-icon="delete" data-theme="d" data-iconpos="notext">Salir</a> --> 
					<h2>Detalle</h2>
					<a data-role="button" data-theme="b" href="#categories" data-icon="back" data-iconpos="notext">Anterior</a>
					<a data-role="button" data-theme="b" href="#georeferencia" data-icon="search" data-transition="slide" data-iconpos="notext">Georefencia</a>
			   </div>
				<!-- /header -->
				<div data-role="content" data-theme="b">
					<p></p>
					<div class="content-primary"  >
						<ul data-role="listview" data-theme="b">
							<li data-role="list-divider">Nombre del Proyecto</li>
							<li><div id="dialog_content_part_1"></div></li>
							
							<li></li>
						</ul>
						<ul data-role="listview" data-theme="c">
							<li data-role="list-divider"></li>
							<li><div id="controlgroup_resource"><a id="resImg" href="#resource" data-transition="slide">Ver Im&#225;genes</a><!--<a id="resVideo" href="#resource">Im&#225;genes</a>--></div></li>
							<li></li>
						</ul>
						<ul data-role="listview" data-theme="b">
							<li data-role="list-divider">Descripci&#243;n</li>
							<li><div id="dialog_content_part_2"></div></li>
							<li></li>
						</ul>
						<ul data-role="listview" data-theme="b">
							<li data-role="list-divider">Datos</li>
							<li><div id="dialog_content_part_3"></div></li>
						
						</ul>
					</div>
					<p></p>
					<center>
						<div data-role="controlgroup" data-type="horizontal">
							<a data-role="button" data-theme="b" href="#categories" >Cerrar</a>
			            	<a  onclick="clickExit()" data-role="button" data-theme="e" data-icon="delete" data-transition="pop">Salir</a>
						</div>
					</center>
				</div>
			   <div data-role="footer" data-theme="c"> 
  			     <div class="css_footer"></div>
			   </div>
	</div>
	<!-- dialog 1-->
	<!--2.1.2-RESULTADO:ESTADISTICAS  -->	
	<div id="grafesta" data-role="page" >
		<div data-role="header" data-theme="b">
		    <a data-role="button" data-theme="b" href="#primary_seek" data-icon="back" data-iconpos="notext">Anterior</a>			
	        <h1>Estadisticas</h1>
			<a onclick="clickExit()" data-role="button" data-icon="delete" data-theme="d" data-iconpos="notext">Salir</a>  
	   </div>		
		<div data-role="content" data-theme="d">
			<center>
				<div id="resultsGrafesta"></div>	
			
			<div data-role="controlgroup" data-type="horizontal">
			 <a data-role="button" data-theme="b"  href="#primary_seek">Cerrar</a>
			  <a  onclick="clickExit()" data-role="button" data-theme="e" data-icon="delete" data-transition="pop">Salir</a>
			</div>
			</center>
		 </div>
				
		<div data-role="footer" data-theme="c"> 
  			 <div class="css_footer"></div>
		</div>
		
	</div>	
	<!--->
	
	<!--2.2-RESULTADO:MENSAJE  -->	
	<div id="popupsek" data-role="page"  data-rel="dialog">
		<div data-role="header" data-theme="b">
	        <h1>Mensaje</h1>
			<a data-role="button" data-theme="b" href="#myview" data-icon="back" data-iconpos="notext">Anterior</a>
	    </div>
		<div data-role="content" data-theme="b">
			<center>
				<h5>No existen datos </h5>	
				<p></p>
				<div data-role="controlgroup" data-type="horizontal">
					<a data-role="button" data-theme="b" href="#myview">Cerrar</a>
					<a  onclick="clickExit()" data-role="button" data-theme="e" data-icon="delete" data-transition="pop">Salir</a>
				</div>
			</center>
		</div>
		
		<div data-role="footer" data-theme="c"> 
  			 <div class="css_footer"></div>
		</div>
	</div>	
	<!-- dialog 2-->
	<!--2.1.2-RESULTADO:RECURSOS  -->	
	<div id="resource" data-role="page" >
		<div data-role="header" data-theme="b">
		    <a data-role="button" data-theme="b" href="#primary_seek" data-icon="back" data-iconpos="notext">Anterior</a>			
	        <h1>Recursos</h1>
			<a onclick="clickExit()" data-role="button" data-icon="delete" data-theme="d" data-iconpos="notext">Salir</a>  
	   </div>		
		<div data-role="content" data-theme="b">
			<center>
				<div id="contentImgTitle"></div>
				<div data-role="controlgroup" data-type="horizontal">
		           <a  data-theme="b"  data-role="button" data-icon="arrow-l" href="javascript:toRight('imagen1')"></a>
		           <a  data-theme="b"  data-role="button" data-icon="arrow-r" href="javascript:toLeft('imagen2')"></a>
		        </div>
				<div id="resultsImg"></div>	
				<div id="contentImg"></div>
				<div data-role="controlgroup" data-type="horizontal">
		           <a  data-theme="b"  data-role="button" data-icon="arrow-l" href="javascript:toRight('imagen1')"></a>
		           <a  data-theme="b"  data-role="button" data-icon="arrow-r" href="javascript:toLeft('imagen2')"></a>
		        </div>
			
			<div data-role="controlgroup" data-type="horizontal">
			 <a data-role="button" data-theme="b"  href="#primary_seek">Cerrar</a>
			  <a  onclick="clickExit()" data-role="button" data-theme="e" data-icon="delete" data-transition="pop">Salir</a>
			</div>
			</center>
		 </div>
				
		<div data-role="footer" data-theme="c"> 
  			 <div class="css_footer"></div>
		</div>
		
	</div>	
	<!--2.1.2-GEOREFERENCIA GLOBAL  -->	
	<div id="georeferencia" data-role="page" >
		<div data-role="header" data-theme="b">
		    <a data-role="button" data-theme="b" href="#primary_seek" data-icon="back" data-iconpos="notext">Anterior</a>			
		    <h3>Georeferencia </h3>
		    <a onclick="clickExit()" data-role="button" data-icon="delete" data-theme="d" data-iconpos="notext">Salir</a>  
		    
	    </div>		
		<div data-role="content" data-theme="b" style="width:100%; height:100%; padding:0;">
				<center>
				<div id="btnszom1" data-role="controlgroup" data-type="horizontal">
					 <a id="btnzom1_plus"  onclick="clickZomm('georeferencia','+');" data-role="button" data-icon="plus" data-iconpos="notext">+</a> 
					 <a id="btnzom1_delete"  onclick="clickZomm('georeferencia','-');" data-role="button" data-icon="minus" data-iconpos="notext">-</a>
				</div>
				<h3><div id="content-label-geo"></div></h3>
				
				<div id="map3" style="width:100%; height:100%;border: 1px solid #777; overflow: hidden;">
				<img border="0" src="src/images/staticmap.gif" /> 
				</div>
		 	 	
				<div data-role="controlgroup" data-type="horizontal">
			 		<a data-role="button" data-theme="b"  href="#primary_seek">Cerrar</a>
			  		<a  onclick="clickExit()" data-role="button" data-theme="e" data-icon="delete" data-transition="pop">Salir</a>
				</div>
				</center>
		 </div>
	
		<div data-role="footer" data-theme="c"> 
  			 <div class="css_footer"></div>
		</div>
	</div>
	<!--2.2-RESULTADO:GEOREFERENCIA GLOBAL  -->	
	<div id="geoglobal" data-role="page"  data-theme="b" class="page-map" style="width:100%; height:100%;">
	
		<div data-role="header" data-theme="b">
	   		<a data-role="button" data-theme="b" href="#categories" data-icon="back" data-iconpos="notext">Anterior</a>			
	        <h3>Georeferencia</h3>
	        <a onclick="clickExit()" data-role="button" data-icon="delete" data-theme="d" data-iconpos="notext">Salir</a>  
	    </div>
	    		
		<div data-role="content" data-theme="b" style="width:100%; height:100%; padding:0;"> 
			<center>
			    <div id="btnszom2" data-role="controlgroup" data-type="horizontal">
				 <a id="btnzom2_plus"  onclick="clickZomm('geoglobal','+');" data-role="button" data-icon="plus" data-iconpos="notext">+</a> 
				 <a id="btnzom2_delete"  onclick="clickZomm('geoglobal','-');" data-role="button" data-icon="minus" data-iconpos="notext">-</a>
				</div>
				<h3><div id="content-label-geo"></div></h3>
			   	<div id="map4" style="width:100%; height:100%;border: 1px solid #777; overflow: hidden;">
			   		<img border="0" src="src/images/staticmap.gif" /> 
			   	</div>
			 
			 	<div data-role="controlgroup" data-type="horizontal">
					<a data-role="button" data-theme="b"  href="#categories">Cerrar</a>
			  		<a  onclick="clickExit()" data-role="button" data-theme="e" data-icon="delete" data-transition="pop">Salir</a>
				</div>
			</center>
		 </div>
		
		<div data-role="footer" data-theme="c"> 
  			 <div class="css_footer"></div>
		</div>
	</div>
	<!-- Include Library --> 
	<script type="text/javascript">
	var aListSelect=null;var ikeySelect=null;var dataResourceLoad=null;var listLoad=new Array();var iZomG=4;var iZomP=10;var iCountTotal=1;var stringPoinst="";var stringLatLog="";var sizeMap="&size=";if(document.documentElement&&document.documentElement.clientWidth!=0){sizeMap+=document.documentElement.clientWidth}else{sizeMap+="300"}sizeMap+="x";if(document.documentElement&&document.documentElement.clientHeight!=0){sizeMap+=document.documentElement.clientHeight}else{sizeMap+="300"}if(listLoad.length==0){listLoad=[false,false,false,false]}function clickExit(){try{var a=mySession.getRol();switch(a){case"RAF":location.replace("indexRAF.html");break;default:location.replace("../index.html");break}}catch(b){alert("Error clickExit: "+b.message)}}$(window).load(function(){});$("#categories").bind("callback",function(d,c){var b="GetProyectoByFilter";var a=c.mydata;$.mobile.pageLoading();if(aListSelect==null){myCaller.doCallService(b,a,"resultscategories","callbackView")}});$('div[id="categories"]').live("pageshow",function(){try{$.mobile.pageLoading(true)}catch(a){alert("Error [id=dialog] pageshow: "+a.message)}});function doClickSeek(){try{var a=0;var f=0;var g=0;var c=0;var b="";if($("#select-choice-1").length){a=parseInt($.trim($("#select-choice-2").val()))||0}if($("#select-choice-2").length){f=parseInt($.trim($("#select-choice-1").val()))||0}if($("#select-choice-3").length){g=parseInt($.trim($("#select-choice-3").val()))||0}if($("#select-choice-4").length){c=parseInt($.trim($("#select-choice-4").val()))||0}b=$.trim($("#txtname").val());sData="iProgramaId="+a+"&iEjeId="+f+"&iTipoId="+g+"&iEstadoId="+c+"&sText="+b;$("#listview_output").html("");$("#categories_content").hide("slow");$('div[id="content-label-count"]').html("");myChangePage("#categories",{mydata:sData})}catch(d){alert("Error fillSelectChoice: "+d.message)}}function doClickClear(){try{var a="";var d=0;$("#txtname").val("");for(var b=1;b<5;b++){a="#select-choice-"+b.toString();d=b-1;if($(a).length){$(a).val("");a="#opt"+d;$(a).html("Ninguno")}}}catch(c){alert("ErrordoClickClear: "+c.message)}}$("#btnSeek1").live("click",function(){doClickSeek()});$("#btnSeek2").live("click",function(){doClickSeek()});$("#btnClear1").live("click",function(){doClickClear()});$("#btnBackSeek").live("click",function(){aListSelect=null;ikeySelect=-1;doClickClear();$.mobile.changePage($("#myview"),"slide")});$('ul[id="controlgroup_links"] a').live("click",function(){var a=$(this).attr("data-url");$.mobile.changePage($(a),"slide")});function clickBackList(){try{$.mobile.changePage($("#myview"),"slide")}catch(a){alert("Error fillSelectChoice: "+a.message)}}function clickZomm(c,b){try{var a="";var d="";if(c=="georeferencia"){if(b=="+"){iZomP+=2;if(iZomP>21){iZomP=20}}if(b=="-"){iZomP-=2;if(iZomP<=0){iZomP=1}}a='<img border="0" src="http://maps.google.com/maps/api/staticmap?maptype=roadmap&markers=size:mid|color:red|'+stringLatLog+"&zoom="+iZomP+"&sensor=false&mobile=true"+sizeMap+' " /> ';d="#map3"}if(c=="geoglobal"){if(b=="+"){iZomG+=2;if(iZomG>21){iZomG=20}}if(b=="-"){iZomG-=2;if(iZomG<=0){iZomG=1}}a='<img border="0" src="http://maps.google.com/maps/api/staticmap?maptype=roadmap&markers=size:mid|color:red'+stringPoinst+"&mobile=true&sensor=false&zoom="+iZomG+sizeMap+' " /> ';d="#map4"}$(d).html(a)}catch(f){alert("Error clickZomm: "+f.message)}}function fillSelectChoice(f,g){try{var d="#select-choice-"+g;var b=jsonParse(f);var a=$(d);if(a){var c=a.prop("options");$(b).each(function(e,j){var i=j.Value;var k=j.Key;c[c.length]=new Option(i,k)})}}catch(h){alert("Error fillSelectChoice: "+h.message)}}function fillSelectChoice4(a){try{fillSelectChoice(a,"4")}catch(b){alert("Error fillSelectChoice4: "+b.message)}}function fillSelectChoice3(a){try{fillSelectChoice(a,"3")}catch(b){alert("Error fillSelectChoice3: "+b.message)}}function fillSelectChoice2(a){try{fillSelectChoice(a,"2")}catch(b){alert("Error fillSelectChoice2: "+b.message)}}function fillSelectChoice1(a){try{fillSelectChoice(a,"1")}catch(b){alert("Error fillSelectChoice1: "+b.message)}}$('div[id="optEst"]').live("pageshow",function(){try{$.mobile.pageLoading();if($("#select-choice-4").length&&listLoad[3]==false){myCaller.doCallService("GetFilter","iCriterio=4","resultsSeekEst","fillSelectChoice4");myCaller.callbackNotLoadingImg();listLoad[3]=true}$.mobile.pageLoading(true)}catch(a){alert("Error [id=myview] pageshow: "+a.message)}});$('div[id="optTipo"]').live("pageshow",function(){try{$.mobile.pageLoading();if($("#select-choice-3").length&&listLoad[2]==false){myCaller.doCallService("GetFilter","iCriterio=3","resultsSeekTipo","fillSelectChoice3");myCaller.callbackNotLoadingImg();listLoad[2]=true}$.mobile.pageLoading(true)}catch(a){alert("Error [id=myview] pageshow: "+a.message)}});$('div[id="optPro"]').live("pageshow",function(){try{$.mobile.pageLoading();if($("#select-choice-2").length&&listLoad[1]==false){myCaller.doCallService("GetFilter","iCriterio=2","resultsSeekPro","fillSelectChoice2");myCaller.callbackNotLoadingImg();listLoad[1]=true}$.mobile.pageLoading(true)}catch(a){alert("Error [id=myview] pageshow: "+a.message)}});$('div[id="optEje"]').live("pageshow",function(){try{$.mobile.pageLoading();if($("#select-choice-1").length&&listLoad[0]==false){myCaller.doCallService("GetFilter","iCriterio=1","resultsSeekEje","fillSelectChoice1");myCaller.callbackNotLoadingImg();listLoad[0]=true}$.mobile.pageLoading(true)}catch(a){alert("Error [id=myview] pageshow: "+a.message)}});$('div[id="myview"]').live("pageshow",function(){try{var b="";var a="";var f=0;for(var c=1;c<5;c++){a="#select-choice-"+c.toString();f=c-1;if($(a).length){b=$(a+" option:selected").text();a="#opt"+f;if(b!=""){$(a).html(b.substring(0,25))}else{$(a).html("Ninguno")}}}}catch(d){alert("Error [id=myview] pageshow: "+d.message)}});$('div[id="view"]').live("pageshow",function(){try{myCaller.callbackNotLoadingImg()}catch(a){alert("Error [id=dialog] pageshow: "+a.message)}});function viewData(c){try{var b=typeof c;if(b=="string"){var a=jsonParse(c);var f=1;$(a).each(function(i,j){var h=j.Id;var g=f+".-"+j.Nombre;var e="<li><a  data-url='"+i+"' data-role='button' data-rel='dialog' data-transition='slide'>"+g+"</a></li>";$("#listview_output").append(e);f=f+1});$("#listview_output").listview("refresh");aListSelect=a}}catch(d){alert("Error viewData: "+d.message)}}function callbackView(c){try{var a=jsonParse(c);var f=0;var b="";if(typeof(a)=="object"){if(a.length){f=a.length}b=f+" Proyectos encontrados "}if(f!=0){$('div[id="content-label-count"]').html(b);$("#categories_content").show("slow");viewData(c);myCaller.callbackNotLoadingImg()}else{$.mobile.changePage($("#popupsek"),"pop")}}catch(d){alert("Error callbackFunction: "+d.message)}}$('div[id="categories"]').live("pageshow",function(){try{$.mobile.pageLoading(true)}catch(a){alert("Error [id=categories] pageshow: "+a.message)}});function viewDetalle(c){try{var a="";a+=""+c.Nombre+"";$("#dialog_content_part_1").html(a);a+="";a+=""+c.Descripcion+"";a+="";$("#dialog_content_part_2").html(a);a="";a+="<fieldset class='ui-grid-a'><div class='ui-block-a'><h4>Latitud</h4></div><div class='ui-block-b'><p>"+c.Latitud+"</p></div></fieldset>";a+="<fieldset class='ui-grid-a'><div class='ui-block-a'><h4>Longitud</h4></div><div class='ui-block-b'><p>"+c.Longitud+"</p></div></fieldset>";a+="<fieldset class='ui-grid-a'><div class='ui-block-a'><h4>Saldo</h4></div><div class='ui-block-b'><p>"+c.Saldo+"</p></div></fieldset>";a+="<fieldset class='ui-grid-a'><div class='ui-block-a'><h4>Presupuesto</h4></div><div class='ui-block-b'><p>"+c.Presupuesto+"</p></div></fieldset>";a+="<fieldset class='ui-grid-a'><div class='ui-block-a'><h4>% Avance</h4></div><div class='ui-block-b'><p>"+c.PorcentajeAvance+"</p></div></fieldset>";a+="<fieldset class='ui-grid-a'><div class='ui-block-a'><h4>Poblaci&#243;n Afectada</h4></div><div class='ui-block-b'><p>"+c.PoblacionAfectada+"</p></div></fieldset>";a+="<fieldset class='ui-grid-a'><div class='ui-block-a'><h4>N&#250;mero Habitantes</h4></div><div class='ui-block-b'><p>"+c.NumeroHabitantes+"</p></div></fieldset>";a+="";$("#dialog_content_part_3").html(a)}catch(b){alert("Error [id=dialog] viewDetalle: "+b.message)}}function getParameterByName(){try{if(aListSelect==null){return null}var c=aListSelect[ikeySelect];var a=typeof c;if(a!="object"){c=null}return(c)}catch(b){alert("Error [id=dialog] getParameterByName: "+b.message)}}function getIdSelect(b){try{var a="-1";var d=getParameterByName();if(d){a=d[b]}return(a)}catch(c){alert("Error getIdSelect: "+c.message)}}$('ul[id="listview_output"] a').live("click",function(){var a=$(this).attr("data-url");if(a!=""){ikeySelect=parseInt(a);$.mobile.changePage($("#primary_seek"),"slide")}else{ikeySelect=-1}});$('div[id="primary_seek"]').live("pageshow",function(){try{var b=getParameterByName();if(b){viewDetalle(b)}}catch(a){alert("Error [id=primary_seek] pageshow: "+a.message)}});function callbackViewResource(a){try{var b=jsonParse(a);$.mobile.pageLoading();$('div[id="contentImg"]').html(b.result);myCaller.callbackNotLoadingImg();$.mobile.pageLoading(true)}catch(c){alert("Error callbackViewImg: "+c.message)}}$('div[id="controlgroup_resource"] a').live("click",function(){dataResourceLoad=$(this).attr("id")});$('div[id="resource"]').live("pageshow",function(){try{var c=getIdSelect("Id",aListSelect,ikeySelect);var b="";var a="";var f="<p><h2>";$('div[id="contentImg"]').html("");if(c!="-1"){a="id="+c;if(dataResourceLoad=="resImg"){f+="Im&#225;genes";b="GetHtmlImagenes"}else{f+="Videos";b="GetHtmlVideos"}f+="</h2>"+getIdSelect("Nombre",aListSelect,ikeySelect)+"";$('div[id="contentImgTitle"]').html(f+"</p>");myCaller.doCallService(b,a,"resultsImg","callbackViewResource")}else{$('div[id="contentImgTitle"]').html("<h1>Sin Recursos</h1>")}}catch(d){alert("Error [id=dialog] pageshow: "+d.message)}});$('div[id="georeferencia"]').live("pageshow",function(){try{var b=getIdSelect("Nombre");var f=getIdSelect("Latitud");var d=getIdSelect("Longitud");stringLatLog=f+","+d;$.mobile.pageLoading();if((navigator.userAgent.match(/BlackBerry/i))){var a='<img border="0" src="http://maps.google.com/maps/api/staticmap?maptype=roadmap&markers=size:mid|color:red|'+stringLatLog+"&zoom="+iZomP+"&sensor=false&mobile=true"+sizeMap+' " /> ';$("#btnszom1").show("slow");$("#map3").html(a)}else{b="("+d+","+f+")";$("#map3").html("");$("#map3").attr("style","width: 547px; height: 320px; border: 1px solid #777; overflow: hidden;");$("#btnszom1").hide("slow");$("#map3").gMap({markers:[{latitude:f,longitude:d,html:b,popup:false}],zoom:10})}$.mobile.pageLoading(true)}catch(c){alert("Error [id=georeferencia]"+c.message)}});$('div[id="geoglobal"]').live("pageshow",function(){try{var c=new Array();stringPoinst="";$(aListSelect).each(function(e,f){var d=new Object();d.latitude=f.Latitud;d.longitude=f.Longitud;d.html=f.Nombre;d.popup=false;stringPoinst=stringPoinst+"|"+d.latitude+","+d.longitude+"&markers=color:red";c.push(d)});$.mobile.pageLoading();if((navigator.userAgent.match(/BlackBerry/i))){var a='<img border="0" src="http://maps.google.com/maps/api/staticmap?maptype=roadmap&markers=size:mid|color:red'+stringPoinst+"&mobile=true&sensor=false&zoom="+iZomP+sizeMap+' " /> ';$("#btnszom2").show("slow");$("#map4").html(a)}else{$("#btnszom2").hide("slow");$("#map4").html("");$("#map4").attr("style","width: 547px; height: 320px; border: 1px solid #777; overflow: hidden;");$("#map4").gMap({markers:c,zoom:6})}$.mobile.pageLoading(true)}catch(b){alert("Error [id=geoglobal]"+b.message)}});
	</script> 
	</body>
</html>
